package dreamdancetiktokenumsmyredis

type DanceAchievementType int64

const (
	DanceAchievementTypeActive         DanceAchievementType = 1000  // 活跃达人
	DanceAchievementTypeScore          DanceAchievementType = 2000  // 欢乐达人
	DanceAchievementTypeLike           DanceAchievementType = 3000  // 点赞达人
	DanceAchievementTypeRank           DanceAchievementType = 4000  // 灵魂舞者
	DanceAchievementTypeRankCp         DanceAchievementType = 5000  // 灵魂搭档
	DanceAchievementTypeDating         DanceAchievementType = 6000  // 舞王传奇
	DanceAchievementTypePresented      DanceAchievementType = 7000  // 慷慨激昂
	DanceAchievementTypeRelationship   DanceAchievementType = 8000  // 你是我的谁
	DanceAchievementTypeElement        DanceAchievementType = 9000  // 收藏大师
	DanceAchievementTypeWings          DanceAchievementType = 10000 // 翅膀传奇
	DanceAchievementTypeHalo           DanceAchievementType = 11000 // 光环传奇
	DanceAchievementTypeHandheld       DanceAchievementType = 12000 // 手持大师
	DanceAchievementTypeSpecialEffects DanceAchievementType = 13000 // 特效大师
	DanceAchievementTypeAirdrop        DanceAchievementType = 14000 // 空投大师
	DanceAchievementTypeMicrophone     DanceAchievementType = 15000 // 话筒大师
	DanceAchievementTypeExplosion      DanceAchievementType = 16000 // 爆炸大师

)

type DanceAchievement struct{}

var DanceAchievementEnums DanceAchievement

func (e DanceAchievement) AchievementsType() []DanceAchievementType {
	return []DanceAchievementType{
		DanceAchievementTypeActive,
		DanceAchievementTypeScore,
		DanceAchievementTypeLike,
		DanceAchievementTypeRank,
		DanceAchievementTypeRankCp,
		DanceAchievementTypeDating,
		DanceAchievementTypeElement,
		DanceAchievementTypeRelationship,
		DanceAchievementTypePresented,
		DanceAchievementTypeWings,
		DanceAchievementTypeHalo,
		DanceAchievementTypeHandheld,
		DanceAchievementTypeSpecialEffects,
		DanceAchievementTypeAirdrop,
		DanceAchievementTypeMicrophone,
		DanceAchievementTypeExplosion,
	}
}

type EventList []DanceAchievementType

func (it EventList) Len() int           { return len(it) }
func (it EventList) Less(i, j int) bool { return it[i] < it[j] }
func (it EventList) Swap(i, j int)      { it[i], it[j] = it[j], it[i] }

func (e DanceAchievement) AchievementsTypeMap() map[DanceAchievementType]DanceAchievementType {
	m := make(map[DanceAchievementType]DanceAchievementType)
	for _, s := range e.AchievementsType() {
		m[s] = s
	}
	return m
}

func (e DanceAchievement) AchievementsTypeString(tag DanceAchievementType) string {
	switch tag {
	case DanceAchievementTypeActive:
		return "活跃达人"
	case DanceAchievementTypeScore:
		return "欢乐达人"
	case DanceAchievementTypeLike:
		return "点赞达人"
	case DanceAchievementTypeRank:
		return "灵魂舞者"
	case DanceAchievementTypeRankCp:
		return "灵魂搭档"
	case DanceAchievementTypeDating:
		return "舞王传奇"
	case DanceAchievementTypePresented:
		return "慷慨激昂"
	case DanceAchievementTypeRelationship:
		return "你是我的谁"
	case DanceAchievementTypeElement:
		return "收藏大师"
	case DanceAchievementTypeWings:
		return "翅膀传奇"
	case DanceAchievementTypeHalo:
		return "光环传奇"
	case DanceAchievementTypeHandheld:
		return "手持大师"
	case DanceAchievementTypeSpecialEffects:
		return "特效大师"
	case DanceAchievementTypeAirdrop:
		return "空投大师"
	case DanceAchievementTypeMicrophone:
		return "话筒大师"
	case DanceAchievementTypeExplosion:
		return "爆炸大师"
	default:
		return "未知"
	}
}
